-
Notifications
You must be signed in to change notification settings - Fork 841
ResultsCache Extract Histogram #7167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResultsCache Extract Histogram #7167
Conversation
Signed-off-by: Paurush Garg <paurushg@amazon.com>
d12c42e to
2246222
Compare
justinjung04
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you
SungJin1212
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
afhassan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
| } | ||
| } | ||
| if len(result.Samples) == 0 { | ||
| if stream.Histograms != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I don't think we need to check for nil here since both Samples and Histograms are not nullable
cortex/pkg/querier/tripperware/query.proto
Lines 49 to 50 in f26509f
| repeated cortexpb.Sample samples = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "values"]; | |
| repeated SampleHistogramPair histograms = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "histograms"]; |
What this PR does:
Adds Native Histogram extraction logic in Results Cache.
Which issue(s) this PR fixes:
Currently NH extraction is missing in Extract in Result Cache. This produces incorrect results when cache is hit for queries like raw histogram queries (or with aggregation like sum).
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]